repeat with x = 1 to the number of chars in process
get char x of process
if it is ";" then put "," into char x of process
end repeat
if word 1 of process is "Added:" then delete word 1 of process
if there is a window "Resource List" then
put the text of window "Resource List" into holdrezTEXT
put the number of lines of char 1 to offset(process, holdrezTEXT)¬
of holdrezTEXT into rezreplaceline
end if
if word 1 of process is "Deleted:" then
beep
do restext("TEXT", "Exit", colorauthoringpath)
end if
if item 2 of process is not "<unnamed>" then
put item 2 of process into TheSound
play TheSound
do restext("TEXT", "Exit", colorauthoringpath)
end if
put item 1 of process into whatKind
put item 2 of process into itsoldName
put item 3 of process into itsID
do showdialog 2, "505", , , "Untitled"
if the result is empty then do restext("TEXT", "Exit", colorauthoringpath)
put line 1 of the result into newname
put FullResList("T=snd ", "O=N") into check
get offset (newname, check)
if it is "0" then
do RenameRes(RenamefilePath, itsID, whatkind, itsoldName, newname)
put newName into item 2 of process
put process into line replaceline of theText
set the text of window where to theTEXT
put item 2 of process into TheSound
play TheSound
if there is a window "Resource List" then
put process into line rezreplaceline of holdrezTEXT
set the text of window "Resource List" to holdrezTEXT
end if
do restext("TEXT", "Exit", colorauthoringpath)
end if
if it is not "0" then
do showdialog 1, "506","You must have a unique name for your sound in order for HyperCard to play it predictably. Please try another name.", "True"
if the result is "2" then do restext("TEXT", "Exit", colorauthoringpath)
if the result is "1" then
repeat
do showdialog 2, "505", , , "Untitled"
if the result is empty then do restext("TEXT", "Exit", colorauthoringpath)
put line 1 of the result into newname
put FullResList("T=snd ", "O=N") into check
get offset (newname, check)
if it is "0" then
do RenameRes(RenamefilePath, itsID, whatkind, itsoldName, newname)
put newName into item 2 of process
put process into line replaceline of theText
set the text of window where to theTEXT
put newname into TheSound
play TheSound
if there is a window "Resource List" then
put process into line rezreplaceline of holdrezTEXT
set the text of window "Resource List" to holdrezTEXT
end if
do restext("TEXT", "Exit", colorauthoringpath)
end if
if it is not "0" then do showdialog 1, "506","You must have a unique name for your sound in order for HyperCard to play it predictably. Please try another name." , "True"
if the result is "2" then do restext("TEXT", "Exit", colorauthoringpath)